package com.sinocare.project.pharmacy.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sinocare.project.common.entity.SccDrugstore;
import com.sinocare.project.pharmacy.db.SccDrugstoreDo;
import org.apache.ibatis.annotations.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 连锁药店表(SccDrugstore)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-20 18:55:28
 */
@Mapper
public interface SccDrugstoreDao extends BaseMapper<SccDrugstore> {
//    @Results(id = "sccDrugstore", value = {
//            @Result(id = true, property = "storeId", column = "store_id"),
//            @Result(property = "storeName", column = "store_name"),
//            @Result(property = "storeCode", column = "store_code"),
//            @Result(property = "customerCode", column = "customer_code"),
//            @Result(property = "userId", column = "user_id"),
//            @Result(property = "provinceCode", column = "province_code"),
//            @Result(property = "province", column = "province"),
//            @Result(property = "cityCode", column = "city_code"),
//            @Result(property = "city", column = "city"),
//            @Result(property = "countyCode", column = "county_code"),
//            @Result(property = "county", column = "county"),
//            @Result(property = "addressDetall", column = "address_detall"),
//            @Result(property = "createTime", column = "create_time"),
//            @Result(property = "updateTime", column = "update_time"),
//            @Result(property = "sncUserLogin", column = "user_id", one = @One(select = "com.sinocare.project.pharmacy.dao.SncUserLoginDao.selectById"))
//    })
//    @Select("select * from scc_drugstore where id=#{id}")
//    SccDrugstore test(Integer id);

//    @Select("select * from scc_drugstore ${ew.}")
//    @ResultMap(value = "sccDrugstore")
    List<SccDrugstoreDo> tests(@Param("ew") QueryWrapper<Object> wrapper);
    SccDrugstore getByUserId(@Param("ew") QueryWrapper<Object> wrapper);
}